#------------------------------Heading-------------------------------------------
#Name: Matt Hahn
#Project: Boat Drawing
#Date Started: 9/26/12
#Date Finished:
#Version: 1
#--------------------------------------------------------------------------------

#----------------------------Code------------------------------------------------

from shapes import *


def trapazoid(t, top=100, bottom=150, side=50, angle=120, rotate=0):
        t.lt(rotate)
        t.lt(120)
        t.fd(side)
        t.lt(60)
        t.fd(top)
        t.lt(60)
        t.fd(side)
        t.lt(120)
        t.fd(bottom)
        t.rt(rotate)


def boat(t, size=1):
    move(t, 0, -300)
    trapazoid(t, size*1, size*1.5, size*0.5, 120, 180)
    move(t, size*1.50, 0)
    line(t, size*.3, 10)
    move(t, size*-.3, -10)
    move(t, size*-.5, 0)
    rect(t, size*.07, size*.95)
    move(t, size*-.95, size*.10)
    right_tri(t, size*.95, size*.85, 0)
    move(t, size*1.42, 0)
    t.rt(180)
    line(t, size*.4, 0)
    move(t, 0, size*-.85)
    line(t, size*-.4, size*.85)
    move(t, size*1.46, size*.10)
    t.rt(180)
    move(t, size*.20, 0)
    line(t, 0, size*.05)
    line(t, size*.4, 0)
    line(t, 0, size*-.05)
    move(t, size*-.2, size*.05)
    line(t, 0, size*.005)
    arc(t, size*.01, 360, 0)
    move (t, 0, size*.0025)
    line(t, size*.02, 0)
    line(t, size*-.04, 0)
    move(t, size*.02, 0)
    line(t, 0, size*.020)
    line(t, 0, size*-.03)
    move(t, size*-.2, size*-.05)
    move(t, size*1.1, size*-.2)
    for i in range (29):
        arc(t, size*.01, 360, 0)
        move(t, size*-.040, 0)
    move(t, 0, size*.08)
    for i in range (31):
        arc(t, size*.01, 360, 0)
        move(t, size*.04, 0)
    move(t, size*.105, size*.12)
    line(t, size*-.025, size*.1)
    move(t, size*.3, size*.75)
    star(t, 5, size*.2, 0)
    move(t, size*-.1, size*-.3)
    star(t, 5, size*.08, 0)
    move(t, size*.5, 0)
    star(t, 5, size*.08, 0)
    move(t, size*-.8, size*.3)
    star(t, 5, size*.08, 0)
    move(t, size*-1.5, 0)
    star(t, 5, size*.08, 0)
    move(t, size*.5, 0)
    star(t, 5, size*.08, 0)
    move(t, size*-.25, size*-.25)
    star(t, 5, size*.08, 0)
    move(t, size*-.5, size*-1.05)
    for i in range (30):
        arc(t, size*.1, 180, 0)
        move(t, size*.1, 0)
    move(t, 0, -size*.1)
    for i in range (31):
        arc(t, size*.1, 180, 0)
        move(t, -size*.1, 0)
    move(t, 0, -size*.1)
    for i in range (31):
        arc(t, size*.1, 180, 0)
        move(t, size*.1, 0)

def StickMan(t, size=100):
    arc(t, size*.75, 360, 0)
    move(t, 0, size*-.75)
    line(t, 0, size*-2.5)
    line(t, size*-.75, size*-1)
    move(t, size*.75, size*1)
    line(t, size*.75, size*-1)
    move(t, size*-.75, size*1)
    move(t, 0, size*1.75)
    line(t, size*-.75, size*-1)
    move(t, size*.75, size*1)
    line(t, size*.75, size*-1)
    move(t, size*-.75, size*1)
    move(t, 0, size*.75)







